/**
 * Created by XianTao on 2016/8/14
 * <p/>
 * Copyright (c) 2015-2015
 * Apache License
 * Version 2.0, January 2004
 * http://www.apache.org/licenses/
 */
package org.smartspring.activiti.restcontroller;

import org.activiti.rest.service.api.repository.BaseDeploymentResourceDataResource;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

@RestController
public class DeploymentResourceDataResourceV2 extends BaseDeploymentResourceDataResource {
    public DeploymentResourceDataResourceV2() {
    }

    @RequestMapping(
            value = {"/v2/repository/deployments/{deploymentId}/resourcedata/{resourceId:.*}"},
            method = {RequestMethod.GET}
    )
    @ResponseBody
    public byte[] getDeploymentResource(@PathVariable("deploymentId") String deploymentId, @PathVariable("resourceId") String resourceId, HttpServletResponse response) {
        return this.getDeploymentResourceData(deploymentId, resourceId, response);
    }
}
